ARD2  1.00 for Rev B. Hardware
Airbag Reference Demonstrator using MPC5604P
Application_Globals.h File Reference

Global variables linked to the ARD2 application independent of all states. More...

Go to the source code of this file.

Defines

#define TRUE   (1u)
#define CLEAR   (0u)
#define BITS_IN_NIBBLE   (4u)
#define BITS_IN_BYTE   (8u)
#define BYTES_IN_16   (2u)
#define BYTES_IN_32   (4u)
#define BIT_DEFINITION
#define BIT0   (1u << 0u)
#define BIT1   (1u << 1u)
#define BIT2   (1u << 2u)
#define BIT3   (1u << 3u)
#define BIT4   (1u << 4u)
#define BIT5   (1u << 5u)
#define BIT6   (1u << 6u)
#define BIT7   (1u << 7u)
#define BIT8   (1u << 8u)
#define BIT9   (1u << 9u)
#define BIT10   (1u << 10)
#define BIT11   (1u << 11)
#define BIT12   (1u << 12)
#define BIT13   (1u << 13)
#define BIT14   (1u << 14)
#define BIT15   (1u << 15)
#define BIT16   (1u << 16)
#define BIT17   (1u << 17)
#define BIT18   (1u << 18)
#define BIT19   (1u << 19)
#define BIT20   (1u << 20)
#define BIT21   (1u << 21)
#define BIT22   (1u << 22)
#define BIT23   (1u << 23)
#define BIT24   (1u << 24)
#define BIT25   (1u << 25)
#define BIT26   (1u << 26)
#define BIT27   (1u << 27)
#define BIT28   (1u << 28)
#define BIT29   (1u << 29)
#define BIT30   (1u << 30)
#define BIT31   (1u << 31)
#define SM_ALL_ACCEL_SIZE   14u
#define SM_CA_GLOBAL_INDEX   12u
#define SM_PSI5_GLOBAL_INDEX   0u
#define SM_MIN_CYCLES_PSI5_REQ   ((uint32_t)(0.0005 / TICK_PERIOD))
#define PSI_SAT1_THRESHOLD   620u
#define PSI_SAT2_THRESHOLD   620u
#define PSI_SAT3_THRESHOLD   620u
#define PSI_SAT4_THRESHOLD   620u
#define CA_X_THRESHOLD   2050u
#define CA_Y_THRESHOLD   2050u
#define N_ELEMENTS(X)   (sizeof(X)/sizeof(*(X)))
#define SQUIB_CH(XX)   XX
#define SAT_CH(XX, YY)   ((XX * 3u) + YY)

Enumerations

enum  CRASH_THESHOLD_CA { CA_CRASH_X = CLEAR, CA_CRASH_Y }

Functions

void vfnSMInitAppGlobals (void)
 Initializes all Application global variables to their default values. Should be called once at the SM start-up.

Variables

vuint16_t gau16RawAccels [SM_ALL_ACCEL_SIZE]
vuint32_t gu32SMCycleStartTime
vuint8_t gu8GUIStateFirstRun
const uint16_t cau16PSI5CrashThresholds []
const uint16_t cau16CACrashThresholds []
const uint8_t cau8SatelliteDetectionDirection []
const uint8_t cau8SatToSquibs []
const uint8_t cu8SizeOfSatToSquibs

Detailed Description

Global variables linked to the ARD2 application independent of all states.

Copyright (C) 2011 Freescale Semiconductor Freescale Confidential Proprietary

Author:
Freescale Semiconductor
SASD Automotive
r11515
Version:
Date:
Warning:
(If needed)

History:


Function Documentation

void vfnSMInitAppGlobals ( void  )

Initializes all Application global variables to their default values. Should be called once at the SM start-up.

Parameters:
None.
Returns:
Void.

Variable Documentation

const uint16_t cau16CACrashThresholds[]

Chart showing thresholds per Central Accelerometer

const uint16_t cau16PSI5CrashThresholds[]

Chart showing thresholds per PSI5 satellite

Chart correlating PSI5 satellites vs. Central accelerometer direction

const uint8_t cau8SatToSquibs[]

Chart correlating squibs to confirmed satellites

const uint8_t cu8SizeOfSatToSquibs

Size of cau8SatToSquibs

vuint16_t gau16RawAccels[SM_ALL_ACCEL_SIZE]

This array holds raw acceleration results for all satellites and sensors

This variable is used to remember when the last SM cycle started. Should be updated in the Acquisition phase only.

This global remembers if we've been through the GUI state before